#include "openingupdateapprequest.h"
#include "openingupdateappresponse.h"

//#include <json.h>

#include <QTextStream>
#include <QVariant>
#include <QDebug>
#include <QUrl>


OpeningUpdateAppRequest::OpeningUpdateAppRequest(QObject *parent) :
    Network::GetJSONRequest(parent),
    m_response(new OpeningUpdateAppResponse)
{
    m_userId = 0;
}

Network::JSONResponse &OpeningUpdateAppRequest::jsonResponse()
{
    return *m_response;
}

const Network::JSONResponse &OpeningUpdateAppRequest::jsonResponse() const
{
    return *m_response;
}

QUrl OpeningUpdateAppRequest::url() const
{
    QString url = QString("http://newsreader2.me.zing.vn/mrm/ver2/bundle?method=get_app_opening_update&uid=%1&lastupdate=-1&sids_lastupdate=-1")
            .arg(m_userId);
    return QUrl(url);
}
